<%@page language="java" import="java.util.*"
	contentType="text/html;charset=UTF-8" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN">
<html ng-app='myApp'>
<head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/js/angular/angular.js"></script>
<!-- home.js要在angular.js之后，否则home.js会报错找不到angular -->
<script src="${pageContext.request.contextPath}/resources/js/home.js"></script>
<script type="text/javascript">
	var basePath = '<%=basePath%>';
</script>
</head>
<body ng-controller='TextController'>
	<h3>Ajax请求示例</h3>
	<a href="<%=basePath%>/login/logout">退出</a> 
	<br/>
	name:<input type="text" size="32" id="name1" /> 
	age:<input type="text" size="3" id="age1" />
	<button onClick="save1()">原始Ajax请求</button>
	<br/>
	name:<input type="text" size="32" id="name2" /> 
	age:<input type="text" size="3" id="age2" />
	<button onClick="save2()">jQuery发起Ajax请求</button>	
	<br/>
	name:<input type="text" size="32" id="name3" ng-model="name3"/> 
	age:<input type="text" size="3" id="age3" ng-model="age3"/>
	<button ng-click="save3()">AngularJS发起Ajax请求</button>	
	<p>{{someText.result}}</p>
</body>
</html>